//
//  BaseViewController.m
//  GradientColorNav
//
//  Created by steven on 2016/12/8.
//  Copyright © 2016年 steven. All rights reserved.
//

#import "GMViewController.h"
#import <MBProgressHUD/MBProgressHUD.h>

@interface GMViewController ()

@end

@implementation GMViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self.view setBackgroundColor:BACKGROUND_COLOR];
    [self.navigationController.navigationBar setBarStyle:UIBarStyleBlack];
}

#pragma mark - hide tabbar when pushed
-(BOOL)hidesBottomBarWhenPushed
{
    return NO;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - show alert message
- (void)showAlertMessage:(NSString *)msg {
    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
    hud.mode = MBProgressHUDModeText;
    hud.labelText = msg;
    // Configure for text only and offset down
    hud.margin = 10.f;
    hud.yOffset = Main_Screen_Height/2-98;
    hud.removeFromSuperViewOnHide = YES;
    
    [hud hide:YES afterDelay:MESSAGE_SHOW_TIME];
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
